@import "~style";

.@{prefix}-multiple-select {
  display: inline-block;
  cursor: text;
  position: relative;
  &-data {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    height: 100%;
    white-space: pre-wrap;
    padding: 2px 5px;
    width: 200px;
    background: @background-color;
    border: 1px solid @primary-border-color;
    border-radius: 2px;
    outline: none;
    min-height: 25px;
    &:hover {
      border: 1px solid @primary-color;
    }
    &-focus {
      border: 1px solid @primary-color;
      box-shadow: 0 0 0 2px @third-primary-color;
    }
    color: @main-font-color;
    &-hidden-input {
      padding: 0;
      font: 400 14px Arial;
      height: 100%;
      z-index: 1;
      position: absolute;
      top: 0;
      left: 0;
      white-space: pre;
      opacity: 0;
      pointer-events: none;
      width: auto;
      display:inline-block;
    }
    &-normal-input {
      padding: 0;
      margin-left: 3px;
      width: 3px !important;
      min-width: 3px;
      //height: 100%;
      font-size: 14px;
      background: transparent;
      border-width: 0;
      border-radius: 4px;
      outline: 0;
    }
    &-simple-input {
      height: 100%;
      width: calc(100% - 10px) !important;
      position: absolute;
      left: 5px;
      top: 0;
      background: transparent;
      border-width: 0;
      outline: 0;
    }
    &-input-placeholder {
      position: absolute;
      top: 0;
      right: 9px;
      left: 10px;
      max-width: 100%;
      height: 100%;
      overflow: hidden;
      color: @third-font-color;
      display: flex;
      flex-direction: row;
      align-items: center;
      white-space: nowrap;
      text-align: left;
      text-overflow: ellipsis;
    }
    &-item {
      &-simple {
        //pointer-events: none;
        text-align: left;
        height: 100%;
        margin-top: -2px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: 100%;
        z-index: 1;
        &-clear {
          position: absolute;
          right: 3px;
          top: 0;
          z-index: 1;
          cursor: pointer;
        }
      }
      margin: 1px 0;
      font-size: 12px;
      cursor: default;
      user-select: none;
      padding: 0 5px;
      border-radius: 2px;
      color: @background-color;
      background: @second-primary-color;
      & + & {
        margin-left: 3px;
      }
      i {
        margin-left: 2px;
        cursor: pointer;
      }
    }
  }
  &-children {
    opacity: 0;
    height: fit-content;
    position: absolute;
    background: @background-color;
    border: 1px solid @primary-border-color-simple;
    color: @second-font-color;
    width: 100%;
    box-shadow: 0 0 6px 2px @primary-border-color;
    max-height: 400px;
    overflow: auto;
    z-index: 999;
  }
  &-empty {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 20px;
    user-select: none;
    cursor: not-allowed;
  }
  &-option {
    cursor: pointer;
    display: block;
    padding: 5px;
    &-check {
      i {
        display: inline-block;
        float: right;
        color: @second-font-color;
      }
    }
    &-default {
      i {
        display: none;
        float: right;
      }
    }
    &:hover {
      background: @second-primary-color;
      color: @background-color;
      i {
        color: @background-color;
      }
    }
  }
}
